
const install = (Vue, vm) => {
    let getProductList = (params = {}) => vm.$u.get('/product/list', params);
    let getProductArea = (params = {}) => vm.$u.get('/product/area', params);
    let getProductCate = (params = {}) => vm.$u.get('/product/cate', params);
    let searchProduct = (params = {}) => vm.$u.get('/product/search', params);
    let getProductDetail = (params = {}) => vm.$u.get('/product/detail', params);
    
    let getArticleList = (params = {}) => vm.$u.get('/article/list', params);
    let getArticleCate = (params = {}) => vm.$u.get('/article/cate', params);
    let getArticleDetail = (params = {}) => vm.$u.get('/article/detail', params);
    
    let getCarousel = (params = {}) => vm.$u.get('/carousel/list', params);
    vm.$u.api = {
        getProductList,
        getProductArea,
        getProductCate,
        getProductDetail,
        getArticleList,
        getArticleCate,
        getArticleDetail,
        getCarousel
    };
}

export default {
    install
}
